import request from '@/utils/request'

// 获取部门列表
export function getDepartmentRequest() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 获取部门列表
export function getManagerRequest() {
  return request({
    url: '/sys/user/simple'
  })
}
// 新增部门
export function addDepartmentRequest(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 获取部门详情
export function getDepartmentByIdRequest(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}
// 修改部门详情
export function updateDepartmentByIdRequest(data, id) {
  return request({
    url: `/company/department/${id}`,
    method: 'put',
    data
  })
}
// 删除部门
export function deleteDepartmentRequest(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
